package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the CUENTA database table.
 * 
 */
@Entity
@Table(name="CUENTA")
public class Cuenta implements Serializable {
	private static final long serialVersionUID = 1L;
	private long cuentaId;
	private String clave;
	private String estado;
	private String exonPago;
	private String fgNewUsrVent;
	private String fgRecMail;
	private String fgSyncTam;
	private String respSecreta;
	private String tipoEsp;
	private String tipoUsr;
	private Date tsCadClave;
	private Date tsCrea;
	private Date tsUltAcc;
	private String usrCrea;
	private String usrId;
	private Set<AudAtenSolicitud> audAtenSolicituds;
	private Set<Contrato> contratos;
	private Set<CriteriosAsigna> criteriosAsignas;
	private TmPregSecreta tmPregSecreta;
	private PeNatu peNatu;
	private CuentaJuri cuentaJuri;
	private Set<LineaPrepago> lineaPrepagos;
	private Set<OrgCta> orgCtas;
	private Set<PerfilCuenta> perfilCuentas;
	private Set<PermisoUsr> permisoUsrs;
	private Set<Solicitud> solicituds;
	private Set<SolicitudXCarga> solicitudXCargas;
	private Set<Transaccion> transaccions;
	private Set<UsrNotaria> usrNotarias;

    public Cuenta() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="CUENTA_ID", unique=true, nullable=false)
	public long getCuentaId() {
		return this.cuentaId;
	}

	public void setCuentaId(long cuentaId) {
		this.cuentaId = cuentaId;
	}


	@Column(nullable=false, length=10)
	public String getClave() {
		return this.clave;
	}

	public void setClave(String clave) {
		this.clave = clave;
	}


	@Column(length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	@Column(name="EXON_PAGO", nullable=false, length=1)
	public String getExonPago() {
		return this.exonPago;
	}

	public void setExonPago(String exonPago) {
		this.exonPago = exonPago;
	}


	@Column(name="FG_NEW_USR_VENT", nullable=false, length=1)
	public String getFgNewUsrVent() {
		return this.fgNewUsrVent;
	}

	public void setFgNewUsrVent(String fgNewUsrVent) {
		this.fgNewUsrVent = fgNewUsrVent;
	}


	@Column(name="FG_REC_MAIL", nullable=false, length=1)
	public String getFgRecMail() {
		return this.fgRecMail;
	}

	public void setFgRecMail(String fgRecMail) {
		this.fgRecMail = fgRecMail;
	}


	@Column(name="FG_SYNC_TAM", length=1)
	public String getFgSyncTam() {
		return this.fgSyncTam;
	}

	public void setFgSyncTam(String fgSyncTam) {
		this.fgSyncTam = fgSyncTam;
	}


	@Column(name="RESP_SECRETA", length=30)
	public String getRespSecreta() {
		return this.respSecreta;
	}

	public void setRespSecreta(String respSecreta) {
		this.respSecreta = respSecreta;
	}


	@Column(name="TIPO_ESP", length=1)
	public String getTipoEsp() {
		return this.tipoEsp;
	}

	public void setTipoEsp(String tipoEsp) {
		this.tipoEsp = tipoEsp;
	}


	@Column(name="TIPO_USR", nullable=false, length=4)
	public String getTipoUsr() {
		return this.tipoUsr;
	}

	public void setTipoUsr(String tipoUsr) {
		this.tipoUsr = tipoUsr;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CAD_CLAVE")
	public Date getTsCadClave() {
		return this.tsCadClave;
	}

	public void setTsCadClave(Date tsCadClave) {
		this.tsCadClave = tsCadClave;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_CREA", nullable=false)
	public Date getTsCrea() {
		return this.tsCrea;
	}

	public void setTsCrea(Date tsCrea) {
		this.tsCrea = tsCrea;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_ACC", nullable=false)
	public Date getTsUltAcc() {
		return this.tsUltAcc;
	}

	public void setTsUltAcc(Date tsUltAcc) {
		this.tsUltAcc = tsUltAcc;
	}


	@Column(name="USR_CREA", length=15)
	public String getUsrCrea() {
		return this.usrCrea;
	}

	public void setUsrCrea(String usrCrea) {
		this.usrCrea = usrCrea;
	}


	@Column(name="USR_ID", nullable=false, length=15)
	public String getUsrId() {
		return this.usrId;
	}

	public void setUsrId(String usrId) {
		this.usrId = usrId;
	}


	//bi-directional many-to-one association to AudAtenSolicitud
	@OneToMany(mappedBy="cuenta")
	public Set<AudAtenSolicitud> getAudAtenSolicituds() {
		return this.audAtenSolicituds;
	}

	public void setAudAtenSolicituds(Set<AudAtenSolicitud> audAtenSolicituds) {
		this.audAtenSolicituds = audAtenSolicituds;
	}
	

	//bi-directional many-to-one association to Contrato
	@OneToMany(mappedBy="cuenta")
	public Set<Contrato> getContratos() {
		return this.contratos;
	}

	public void setContratos(Set<Contrato> contratos) {
		this.contratos = contratos;
	}
	

	//bi-directional many-to-one association to CriteriosAsigna
	@OneToMany(mappedBy="cuenta")
	public Set<CriteriosAsigna> getCriteriosAsignas() {
		return this.criteriosAsignas;
	}

	public void setCriteriosAsignas(Set<CriteriosAsigna> criteriosAsignas) {
		this.criteriosAsignas = criteriosAsignas;
	}
	

	//bi-directional many-to-one association to TmPregSecreta
    @ManyToOne
	@JoinColumn(name="PREG_SEC_ID", nullable=false)
	public TmPregSecreta getTmPregSecreta() {
		return this.tmPregSecreta;
	}

	public void setTmPregSecreta(TmPregSecreta tmPregSecreta) {
		this.tmPregSecreta = tmPregSecreta;
	}
	

	//bi-directional many-to-one association to PeNatu
    @ManyToOne
	@JoinColumn(name="PE_NATU_ID", nullable=false)
	public PeNatu getPeNatu() {
		return this.peNatu;
	}

	public void setPeNatu(PeNatu peNatu) {
		this.peNatu = peNatu;
	}
	

	//bi-directional one-to-one association to CuentaJuri
	@OneToOne(mappedBy="cuenta")
	public CuentaJuri getCuentaJuri() {
		return this.cuentaJuri;
	}

	public void setCuentaJuri(CuentaJuri cuentaJuri) {
		this.cuentaJuri = cuentaJuri;
	}
	

	//bi-directional many-to-one association to LineaPrepago
	@OneToMany(mappedBy="cuenta")
	public Set<LineaPrepago> getLineaPrepagos() {
		return this.lineaPrepagos;
	}

	public void setLineaPrepagos(Set<LineaPrepago> lineaPrepagos) {
		this.lineaPrepagos = lineaPrepagos;
	}
	

	//bi-directional many-to-one association to OrgCta
	@OneToMany(mappedBy="cuenta")
	public Set<OrgCta> getOrgCtas() {
		return this.orgCtas;
	}

	public void setOrgCtas(Set<OrgCta> orgCtas) {
		this.orgCtas = orgCtas;
	}
	

	//bi-directional many-to-one association to PerfilCuenta
	@OneToMany(mappedBy="cuenta")
	public Set<PerfilCuenta> getPerfilCuentas() {
		return this.perfilCuentas;
	}

	public void setPerfilCuentas(Set<PerfilCuenta> perfilCuentas) {
		this.perfilCuentas = perfilCuentas;
	}
	

	//bi-directional many-to-one association to PermisoUsr
	@OneToMany(mappedBy="cuenta")
	public Set<PermisoUsr> getPermisoUsrs() {
		return this.permisoUsrs;
	}

	public void setPermisoUsrs(Set<PermisoUsr> permisoUsrs) {
		this.permisoUsrs = permisoUsrs;
	}
	

	//bi-directional many-to-one association to Solicitud
	@OneToMany(mappedBy="cuenta")
	public Set<Solicitud> getSolicituds() {
		return this.solicituds;
	}

	public void setSolicituds(Set<Solicitud> solicituds) {
		this.solicituds = solicituds;
	}
	

	//bi-directional many-to-one association to SolicitudXCarga
	@OneToMany(mappedBy="cuenta")
	public Set<SolicitudXCarga> getSolicitudXCargas() {
		return this.solicitudXCargas;
	}

	public void setSolicitudXCargas(Set<SolicitudXCarga> solicitudXCargas) {
		this.solicitudXCargas = solicitudXCargas;
	}
	

	//bi-directional many-to-one association to Transaccion
	@OneToMany(mappedBy="cuenta")
	public Set<Transaccion> getTransaccions() {
		return this.transaccions;
	}

	public void setTransaccions(Set<Transaccion> transaccions) {
		this.transaccions = transaccions;
	}
	

	//bi-directional many-to-one association to UsrNotaria
	@OneToMany(mappedBy="cuenta")
	public Set<UsrNotaria> getUsrNotarias() {
		return this.usrNotarias;
	}

	public void setUsrNotarias(Set<UsrNotaria> usrNotarias) {
		this.usrNotarias = usrNotarias;
	}
	
}